<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Component-first</title>
    <link rel="stylesheet" href="../../../assets/css/bootstrap.min.css">
    <script src="../../../assets/js/vue-2.5.6.js"></script>
</head>

<body>
    <div id="app">
        <jspang></jspang>
    </div>
</body>
<script>
    var city = {
        template: `<div>Sichuan of China</div>`
    }
    var jspang = {
            template: `<div>
                    <p> Panda from China!</p>
                    <city></city>
            </div>`,
            components: {
                "city": city
            }
        }
        // 组件注册的是一个标签，而指令注册的是已有标签里的一个属性
    var app = new Vue({
        el: "#app",
        components: {
            "jspang": jspang
        }
    })
</script>

</html>